Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AArch64][RISCV] Improve the tests for --print-enabled-extensions and --print-supported-extensions #97829

Merged
merged 3 commits into from
Jul 8, 2024

Conversation

tmatheson-arm
Copy link
Contributor

@tmatheson-arm tmatheson-arm commented Jul 5, 2024

For AArch64, we have existing tests for --print-enabled-extensions for each architecture. However:

  • These are added to the end of the existing tests which check for "-target-feature", which complicates them slightly.
  • They do not test the descriptions printed next to each feature.
  • Part of the output was tested separately in TargetParserTest.
  • We did not have any tests of this output for CPUs (only for architectures).

Similarly, the tests for --print-supported-extensions do not give complete coverage of either the full list of features or the descriptions.

In my opinion we should be testing the full output, as this is what the user sees. Descriptions and formatting can contain errors and be accidentally broken.

These outputs are unlikely to change much in future. If they do need updated, it will be relatively easy to do because the new tests are so simple.

The new tests are autogenerated, but I am not merging the script that creates them because there isn't a good place for it. Updating these tests could be helped in future with the use of an automated test updater, something like update_*_test_checks.py that simply considers stdout/stderr (which would be useful for other things too). But that would need to be written.

@llvmbot llvmbot added clang Clang issues not falling into any other category backend:RISC-V clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Jul 5, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 5, 2024

@llvm/pr-subscribers-clang
@llvm/pr-subscribers-clang-driver

@llvm/pr-subscribers-backend-risc-v

Author: Tomas Matheson (tmatheson-arm)

Changes

For AArch64, we have existing tests for --print-enabled-extensions for each architecture. However:

  • These are added to the end of the existing tests which check for "-target-feature", which complicates them slightly.
  • They do not test the descriptions printed next to each feature.
  • Part of the output was tested separately in TargetParserTest.

Similarly, the tests for --print-supported-extensions do not give complete coverage of either the full list of features or the descriptions.

In my opinion we should be testing the full output, as this is what the user sees. Descriptions and formatting can contain errors and be accidentally broken.

These outputs are unlikely to change much in future. If they do need updated, it will be relatively easy to do because the new tests are so simple.

The new tests are autogenerated, but I am not merging the script that creates them because there isn't a good place for it. Updating these tests could be helped in future with the use of an automated test updater, something like update_*_test_checks.py that simply considers stdout/stderr (which would be useful for other things too). But that would need to be written.


Patch is 445.95 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/97829.diff

109 Files Affected:

  • (modified) clang/test/Driver/aarch64-v81a.c (-14)
  • (modified) clang/test/Driver/aarch64-v82a.c (-18)
  • (modified) clang/test/Driver/aarch64-v83a.c (-23)
  • (modified) clang/test/Driver/aarch64-v84a.c (-34)
  • (modified) clang/test/Driver/aarch64-v85a.c (-42)
  • (modified) clang/test/Driver/aarch64-v86a.c (-47)
  • (modified) clang/test/Driver/aarch64-v87a.c (-50)
  • (modified) clang/test/Driver/aarch64-v88a.c (-53)
  • (modified) clang/test/Driver/aarch64-v89a.c (-59)
  • (modified) clang/test/Driver/aarch64-v8a.c (-8)
  • (modified) clang/test/Driver/aarch64-v91a.c (-52)
  • (modified) clang/test/Driver/aarch64-v92a.c (-55)
  • (modified) clang/test/Driver/aarch64-v93a.c (-58)
  • (modified) clang/test/Driver/aarch64-v94a.c (-64)
  • (modified) clang/test/Driver/aarch64-v95a.c (-67)
  • (modified) clang/test/Driver/aarch64-v9a.c (-47)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-a64fx.c (+24)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-ampere1.c (+54)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-ampere1a.c (+56)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-ampere1b.c (+60)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-apple-a10.c (+16)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-apple-a11.c (+22)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-apple-a12.c (+27)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-apple-a13.c (+40)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-apple-a14.c (+47)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-apple-a15.c (+53)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-apple-a16.c (+54)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-apple-a17.c (+54)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-apple-a7.c (+11)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-apple-m4.c (+60)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv8-a.c (+10)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv8-r.c (+35)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv8.1-a.c (+16)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv8.2-a.c (+20)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv8.3-a.c (+25)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv8.4-a.c (+36)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv8.5-a.c (+44)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv8.6-a.c (+49)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv8.7-a.c (+52)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv8.8-a.c (+55)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv8.9-a.c (+61)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv9-a.c (+49)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv9.1-a.c (+54)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv9.2-a.c (+57)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv9.3-a.c (+60)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv9.4-a.c (+66)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-armv9.5-a.c (+69)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-carmel.c (+21)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a34.c (+12)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a35.c (+12)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a510.c (+55)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a520.c (+61)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a520ae.c (+61)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a53.c (+12)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a55.c (+24)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a57.c (+12)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a65.c (+25)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a65ae.c (+25)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a710.c (+55)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a715.c (+56)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a72.c (+12)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a720.c (+63)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a720ae.c (+63)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a725.c (+63)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a73.c (+12)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a75.c (+24)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a76.c (+25)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a76ae.c (+25)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a77.c (+25)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a78.c (+26)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a78ae.c (+26)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-a78c.c (+28)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-r82.c (+36)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-r82ae.c (+36)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-x1.c (+26)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-x1c.c (+30)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-x2.c (+55)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-x3.c (+56)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-x4.c (+63)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-cortex-x925.c (+63)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-exynos-m3.c (+12)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-exynos-m4.c (+23)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-exynos-m5.c (+23)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-falkor.c (+13)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-generic.c (+10)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-kryo.c (+12)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-neoverse-512tvb.c (+48)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-neoverse-e1.c (+25)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-neoverse-n1.c (+26)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-neoverse-n2.c (+55)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-neoverse-n3.c (+64)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-neoverse-v1.c (+48)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-neoverse-v2.c (+57)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-neoverse-v3.c (+66)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-neoverse-v3ae.c (+66)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-oryon-1.c (+56)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-saphira.c (+38)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-thunderx.c (+12)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-thunderx2t99.c (+16)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-thunderx3t110.c (+26)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-thunderxt81.c (+12)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-thunderxt83.c (+12)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-thunderxt88.c (+12)
  • (added) clang/test/Driver/print-enabled-extensions/aarch64-tsv110.c (+27)
  • (added) clang/test/Driver/print-supported-extensions-aarch64.c (+83)
  • (added) clang/test/Driver/print-supported-extensions-arm.c (+30)
  • (added) clang/test/Driver/print-supported-extensions-riscv.c (+197)
  • (modified) clang/test/Driver/print-supported-extensions.c (+2-21)
  • (modified) llvm/unittests/TargetParser/TargetParserTest.cpp (-17)
diff --git a/clang/test/Driver/aarch64-v81a.c b/clang/test/Driver/aarch64-v81a.c
index f3873b3ab1864..e84652ec7f11e 100644
--- a/clang/test/Driver/aarch64-v81a.c
+++ b/clang/test/Driver/aarch64-v81a.c
@@ -19,17 +19,3 @@
 // RUN: %clang --target=arm64 -mlittle-endian -march=armv8.1a -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERICV81A %s
 // RUN: %clang --target=arm64 -mlittle-endian -march=armv8.1-a -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERICV81A %s
 // ARM64-GENERICV81A: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "generic"{{.*}} "-target-feature" "+v8.1a"{{.*}} "-target-feature" "+neon"
-
-// ===== Architecture extensions =====
-
-// RUN: %if aarch64-registered-target %{ %clang -target aarch64 -march=armv8.1-a --print-enabled-extensions | FileCheck -check-prefix=ARCH-EXTENSION --implicit-check-not FEAT_ %s %}
-// ARCH-EXTENSION: FEAT_AdvSIMD
-// ARCH-EXTENSION: FEAT_CRC32
-// ARCH-EXTENSION: FEAT_ETE
-// ARCH-EXTENSION: FEAT_FP
-// ARCH-EXTENSION: FEAT_LOR
-// ARCH-EXTENSION: FEAT_LSE
-// ARCH-EXTENSION: FEAT_PAN
-// ARCH-EXTENSION: FEAT_RDM
-// ARCH-EXTENSION: FEAT_TRBE
-// ARCH-EXTENSION: FEAT_VHE
diff --git a/clang/test/Driver/aarch64-v82a.c b/clang/test/Driver/aarch64-v82a.c
index 318c270cad396..9dd355934c105 100644
--- a/clang/test/Driver/aarch64-v82a.c
+++ b/clang/test/Driver/aarch64-v82a.c
@@ -13,21 +13,3 @@
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.2a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV82A-BE %s
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.2-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV82A-BE %s
 // GENERICV82A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+v8.2a"{{.*}} "-target-feature" "+neon"
-
-// ===== Architecture extensions =====
-
-// RUN: %if aarch64-registered-target %{ %clang -target aarch64 -march=armv8.2-a --print-enabled-extensions | FileCheck -check-prefix=ARCH-EXTENSION --implicit-check-not FEAT_ %s %}
-// ARCH-EXTENSION: FEAT_AdvSIMD
-// ARCH-EXTENSION: FEAT_CRC32
-// ARCH-EXTENSION: FEAT_DPB
-// ARCH-EXTENSION: FEAT_ETE
-// ARCH-EXTENSION: FEAT_FP
-// ARCH-EXTENSION: FEAT_LOR
-// ARCH-EXTENSION: FEAT_LSE
-// ARCH-EXTENSION: FEAT_PAN
-// ARCH-EXTENSION: FEAT_PAN2
-// ARCH-EXTENSION: FEAT_RAS, FEAT_RASv1p1
-// ARCH-EXTENSION: FEAT_RDM
-// ARCH-EXTENSION: FEAT_TRBE
-// ARCH-EXTENSION: FEAT_UAO
-// ARCH-EXTENSION: FEAT_VHE
diff --git a/clang/test/Driver/aarch64-v83a.c b/clang/test/Driver/aarch64-v83a.c
index f35c500ee0a9b..b0ff9fb3abc24 100644
--- a/clang/test/Driver/aarch64-v83a.c
+++ b/clang/test/Driver/aarch64-v83a.c
@@ -13,26 +13,3 @@
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.3a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV83A-BE %s
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.3-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV83A-BE %s
 // GENERICV83A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+v8.3a"{{.*}} "-target-feature" "+neon"
-
-// ===== Architecture extensions =====
-
-// RUN: %if aarch64-registered-target %{ %clang -target aarch64 -march=armv8.3-a --print-enabled-extensions | FileCheck -check-prefix=ARCH-EXTENSION --implicit-check-not FEAT_ %s %}
-// ARCH-EXTENSION: FEAT_AdvSIMD
-// ARCH-EXTENSION: FEAT_CCIDX
-// ARCH-EXTENSION: FEAT_CRC32
-// ARCH-EXTENSION: FEAT_DPB
-// ARCH-EXTENSION: FEAT_ETE
-// ARCH-EXTENSION: FEAT_FCMA
-// ARCH-EXTENSION: FEAT_FP
-// ARCH-EXTENSION: FEAT_JSCVT
-// ARCH-EXTENSION: FEAT_LOR
-// ARCH-EXTENSION: FEAT_LRCPC
-// ARCH-EXTENSION: FEAT_LSE
-// ARCH-EXTENSION: FEAT_PAN
-// ARCH-EXTENSION: FEAT_PAN2
-// ARCH-EXTENSION: FEAT_PAuth
-// ARCH-EXTENSION: FEAT_RAS, FEAT_RASv1p1
-// ARCH-EXTENSION: FEAT_RDM
-// ARCH-EXTENSION: FEAT_TRBE
-// ARCH-EXTENSION: FEAT_UAO
-// ARCH-EXTENSION: FEAT_VHE
diff --git a/clang/test/Driver/aarch64-v84a.c b/clang/test/Driver/aarch64-v84a.c
index d72c79fc14cec..030990bfe5131 100644
--- a/clang/test/Driver/aarch64-v84a.c
+++ b/clang/test/Driver/aarch64-v84a.c
@@ -13,37 +13,3 @@
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.4a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV84A-BE %s
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.4-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV84A-BE %s
 // GENERICV84A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+v8.4a"{{.*}} "-target-feature" "+neon"
-
-// ===== Architecture extensions =====
-
-// RUN: %if aarch64-registered-target %{ %clang -target aarch64 -march=armv8.4-a --print-enabled-extensions | FileCheck -check-prefix=ARCH-EXTENSION --implicit-check-not FEAT_ %s %}
-// ARCH-EXTENSION: FEAT_AMUv1
-// ARCH-EXTENSION: FEAT_AdvSIMD
-// ARCH-EXTENSION: FEAT_CCIDX
-// ARCH-EXTENSION: FEAT_CRC32
-// ARCH-EXTENSION: FEAT_DIT
-// ARCH-EXTENSION: FEAT_DPB
-// ARCH-EXTENSION: FEAT_DotProd
-// ARCH-EXTENSION: FEAT_ETE
-// ARCH-EXTENSION: FEAT_FCMA
-// ARCH-EXTENSION: FEAT_FP
-// ARCH-EXTENSION: FEAT_FlagM
-// ARCH-EXTENSION: FEAT_JSCVT
-// ARCH-EXTENSION: FEAT_LOR
-// ARCH-EXTENSION: FEAT_LRCPC
-// ARCH-EXTENSION: FEAT_LRCPC2
-// ARCH-EXTENSION: FEAT_LSE
-// ARCH-EXTENSION: FEAT_LSE2
-// ARCH-EXTENSION: FEAT_MPAM
-// ARCH-EXTENSION: FEAT_NV, FEAT_NV2
-// ARCH-EXTENSION: FEAT_PAN
-// ARCH-EXTENSION: FEAT_PAN2
-// ARCH-EXTENSION: FEAT_PAuth
-// ARCH-EXTENSION: FEAT_RAS, FEAT_RASv1p1
-// ARCH-EXTENSION: FEAT_RDM
-// ARCH-EXTENSION: FEAT_SEL2
-// ARCH-EXTENSION: FEAT_TLBIOS, FEAT_TLBIRANGE
-// ARCH-EXTENSION: FEAT_TRBE
-// ARCH-EXTENSION: FEAT_TRF
-// ARCH-EXTENSION: FEAT_UAO
-// ARCH-EXTENSION: FEAT_VHE
diff --git a/clang/test/Driver/aarch64-v85a.c b/clang/test/Driver/aarch64-v85a.c
index 06c0989bc8e9b..3e1e921dcc013 100644
--- a/clang/test/Driver/aarch64-v85a.c
+++ b/clang/test/Driver/aarch64-v85a.c
@@ -13,45 +13,3 @@
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.5a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV85A-BE %s
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.5-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV85A-BE %s
 // GENERICV85A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+v8.5a"{{.*}} "-target-feature" "+neon"
-
-// ===== Architecture extensions =====
-
-// RUN: %if aarch64-registered-target %{ %clang -target aarch64 -march=armv8.5-a --print-enabled-extensions | FileCheck -check-prefix=ARCH-EXTENSION --implicit-check-not FEAT_ %s %}
-// ARCH-EXTENSION: FEAT_AMUv1
-// ARCH-EXTENSION: FEAT_AdvSIMD
-// ARCH-EXTENSION: FEAT_BTI
-// ARCH-EXTENSION: FEAT_CCIDX
-// ARCH-EXTENSION: FEAT_CRC32
-// ARCH-EXTENSION: FEAT_CSV2_2
-// ARCH-EXTENSION: FEAT_DIT
-// ARCH-EXTENSION: FEAT_DPB
-// ARCH-EXTENSION: FEAT_DPB2
-// ARCH-EXTENSION: FEAT_DotProd
-// ARCH-EXTENSION: FEAT_ETE
-// ARCH-EXTENSION: FEAT_FCMA
-// ARCH-EXTENSION: FEAT_FP
-// ARCH-EXTENSION: FEAT_FRINTTS
-// ARCH-EXTENSION: FEAT_FlagM
-// ARCH-EXTENSION: FEAT_FlagM2
-// ARCH-EXTENSION: FEAT_JSCVT
-// ARCH-EXTENSION: FEAT_LOR
-// ARCH-EXTENSION: FEAT_LRCPC
-// ARCH-EXTENSION: FEAT_LRCPC2
-// ARCH-EXTENSION: FEAT_LSE
-// ARCH-EXTENSION: FEAT_LSE2
-// ARCH-EXTENSION: FEAT_MPAM
-// ARCH-EXTENSION: FEAT_NV, FEAT_NV2
-// ARCH-EXTENSION: FEAT_PAN
-// ARCH-EXTENSION: FEAT_PAN2
-// ARCH-EXTENSION: FEAT_PAuth
-// ARCH-EXTENSION: FEAT_RAS, FEAT_RASv1p1
-// ARCH-EXTENSION: FEAT_RDM
-// ARCH-EXTENSION: FEAT_SB
-// ARCH-EXTENSION: FEAT_SEL2
-// ARCH-EXTENSION: FEAT_SPECRES
-// ARCH-EXTENSION: FEAT_SSBS, FEAT_SSBS2
-// ARCH-EXTENSION: FEAT_TLBIOS, FEAT_TLBIRANGE
-// ARCH-EXTENSION: FEAT_TRBE
-// ARCH-EXTENSION: FEAT_TRF
-// ARCH-EXTENSION: FEAT_UAO
-// ARCH-EXTENSION: FEAT_VHE
diff --git a/clang/test/Driver/aarch64-v86a.c b/clang/test/Driver/aarch64-v86a.c
index 04d372e762a37..ba2b57979b518 100644
--- a/clang/test/Driver/aarch64-v86a.c
+++ b/clang/test/Driver/aarch64-v86a.c
@@ -13,50 +13,3 @@
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.6a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV86A-BE %s
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.6-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV86A-BE %s
 // GENERICV86A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+v8.6a"{{.*}} "-target-feature" "+neon"
-
-// ===== Architecture extensions =====
-
-// RUN: %if aarch64-registered-target %{ %clang -target aarch64 -march=armv8.6-a --print-enabled-extensions | FileCheck -check-prefix=ARCH-EXTENSION --implicit-check-not FEAT_ %s %}
-// ARCH-EXTENSION: FEAT_AMUv1
-// ARCH-EXTENSION: FEAT_AMUv1p1
-// ARCH-EXTENSION: FEAT_AdvSIMD
-// ARCH-EXTENSION: FEAT_BF16
-// ARCH-EXTENSION: FEAT_BTI
-// ARCH-EXTENSION: FEAT_CCIDX
-// ARCH-EXTENSION: FEAT_CRC32
-// ARCH-EXTENSION: FEAT_CSV2_2
-// ARCH-EXTENSION: FEAT_DIT
-// ARCH-EXTENSION: FEAT_DPB
-// ARCH-EXTENSION: FEAT_DPB2
-// ARCH-EXTENSION: FEAT_DotProd
-// ARCH-EXTENSION: FEAT_ECV
-// ARCH-EXTENSION: FEAT_ETE
-// ARCH-EXTENSION: FEAT_FCMA
-// ARCH-EXTENSION: FEAT_FGT
-// ARCH-EXTENSION: FEAT_FP
-// ARCH-EXTENSION: FEAT_FRINTTS
-// ARCH-EXTENSION: FEAT_FlagM
-// ARCH-EXTENSION: FEAT_FlagM2
-// ARCH-EXTENSION: FEAT_I8MM
-// ARCH-EXTENSION: FEAT_JSCVT
-// ARCH-EXTENSION: FEAT_LOR
-// ARCH-EXTENSION: FEAT_LRCPC
-// ARCH-EXTENSION: FEAT_LRCPC2
-// ARCH-EXTENSION: FEAT_LSE
-// ARCH-EXTENSION: FEAT_LSE2
-// ARCH-EXTENSION: FEAT_MPAM
-// ARCH-EXTENSION: FEAT_NV, FEAT_NV2
-// ARCH-EXTENSION: FEAT_PAN
-// ARCH-EXTENSION: FEAT_PAN2
-// ARCH-EXTENSION: FEAT_PAuth
-// ARCH-EXTENSION: FEAT_RAS, FEAT_RASv1p1
-// ARCH-EXTENSION: FEAT_RDM
-// ARCH-EXTENSION: FEAT_SB
-// ARCH-EXTENSION: FEAT_SEL2
-// ARCH-EXTENSION: FEAT_SPECRES
-// ARCH-EXTENSION: FEAT_SSBS, FEAT_SSBS2
-// ARCH-EXTENSION: FEAT_TLBIOS, FEAT_TLBIRANGE
-// ARCH-EXTENSION: FEAT_TRBE
-// ARCH-EXTENSION: FEAT_TRF
-// ARCH-EXTENSION: FEAT_UAO
-// ARCH-EXTENSION: FEAT_VHE
diff --git a/clang/test/Driver/aarch64-v87a.c b/clang/test/Driver/aarch64-v87a.c
index b385e7cfb2ad6..ee4b68882739a 100644
--- a/clang/test/Driver/aarch64-v87a.c
+++ b/clang/test/Driver/aarch64-v87a.c
@@ -13,53 +13,3 @@
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.7a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV87A-BE %s
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.7-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV87A-BE %s
 // GENERICV87A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+v8.7a"{{.*}} "-target-feature" "+neon"
-
-// ===== Architecture extensions =====
-
-// RUN: %if aarch64-registered-target %{ %clang -target aarch64 -march=armv8.7-a --print-enabled-extensions | FileCheck -check-prefix=ARCH-EXTENSION --implicit-check-not FEAT_ %s %}
-// ARCH-EXTENSION: FEAT_AMUv1
-// ARCH-EXTENSION: FEAT_AMUv1p1
-// ARCH-EXTENSION: FEAT_AdvSIMD
-// ARCH-EXTENSION: FEAT_BF16
-// ARCH-EXTENSION: FEAT_BTI
-// ARCH-EXTENSION: FEAT_CCIDX
-// ARCH-EXTENSION: FEAT_CRC32
-// ARCH-EXTENSION: FEAT_CSV2_2
-// ARCH-EXTENSION: FEAT_DIT
-// ARCH-EXTENSION: FEAT_DPB
-// ARCH-EXTENSION: FEAT_DPB2
-// ARCH-EXTENSION: FEAT_DotProd
-// ARCH-EXTENSION: FEAT_ECV
-// ARCH-EXTENSION: FEAT_ETE
-// ARCH-EXTENSION: FEAT_FCMA
-// ARCH-EXTENSION: FEAT_FGT
-// ARCH-EXTENSION: FEAT_FP
-// ARCH-EXTENSION: FEAT_FRINTTS
-// ARCH-EXTENSION: FEAT_FlagM
-// ARCH-EXTENSION: FEAT_FlagM2
-// ARCH-EXTENSION: FEAT_HCX
-// ARCH-EXTENSION: FEAT_I8MM
-// ARCH-EXTENSION: FEAT_JSCVT
-// ARCH-EXTENSION: FEAT_LOR
-// ARCH-EXTENSION: FEAT_LRCPC
-// ARCH-EXTENSION: FEAT_LRCPC2
-// ARCH-EXTENSION: FEAT_LSE
-// ARCH-EXTENSION: FEAT_LSE2
-// ARCH-EXTENSION: FEAT_MPAM
-// ARCH-EXTENSION: FEAT_NV, FEAT_NV2
-// ARCH-EXTENSION: FEAT_PAN
-// ARCH-EXTENSION: FEAT_PAN2
-// ARCH-EXTENSION: FEAT_PAuth
-// ARCH-EXTENSION: FEAT_RAS, FEAT_RASv1p1
-// ARCH-EXTENSION: FEAT_RDM
-// ARCH-EXTENSION: FEAT_SB
-// ARCH-EXTENSION: FEAT_SEL2
-// ARCH-EXTENSION: FEAT_SPECRES
-// ARCH-EXTENSION: FEAT_SSBS, FEAT_SSBS2
-// ARCH-EXTENSION: FEAT_TLBIOS, FEAT_TLBIRANGE
-// ARCH-EXTENSION: FEAT_TRBE
-// ARCH-EXTENSION: FEAT_TRF
-// ARCH-EXTENSION: FEAT_UAO
-// ARCH-EXTENSION: FEAT_VHE
-// ARCH-EXTENSION: FEAT_WFxT
-// ARCH-EXTENSION: FEAT_XS
diff --git a/clang/test/Driver/aarch64-v88a.c b/clang/test/Driver/aarch64-v88a.c
index 438796b91fff6..b680c1f567134 100644
--- a/clang/test/Driver/aarch64-v88a.c
+++ b/clang/test/Driver/aarch64-v88a.c
@@ -13,56 +13,3 @@
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.8a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV88A-BE %s
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.8-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV88A-BE %s
 // GENERICV88A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+v8.8a"{{.*}} "-target-feature" "+neon"
-
-// ===== Architecture extensions =====
-
-// RUN: %if aarch64-registered-target %{ %clang -target aarch64 -march=armv8.8-a --print-enabled-extensions | FileCheck -check-prefix=ARCH-EXTENSION --implicit-check-not FEAT_ %s %}
-// ARCH-EXTENSION: FEAT_AMUv1
-// ARCH-EXTENSION: FEAT_AMUv1p1
-// ARCH-EXTENSION: FEAT_AdvSIMD
-// ARCH-EXTENSION: FEAT_BF16
-// ARCH-EXTENSION: FEAT_BTI
-// ARCH-EXTENSION: FEAT_CCIDX
-// ARCH-EXTENSION: FEAT_CRC32
-// ARCH-EXTENSION: FEAT_CSV2_2
-// ARCH-EXTENSION: FEAT_DIT
-// ARCH-EXTENSION: FEAT_DPB
-// ARCH-EXTENSION: FEAT_DPB2
-// ARCH-EXTENSION: FEAT_DotProd
-// ARCH-EXTENSION: FEAT_ECV
-// ARCH-EXTENSION: FEAT_ETE
-// ARCH-EXTENSION: FEAT_FCMA
-// ARCH-EXTENSION: FEAT_FGT
-// ARCH-EXTENSION: FEAT_FP
-// ARCH-EXTENSION: FEAT_FRINTTS
-// ARCH-EXTENSION: FEAT_FlagM
-// ARCH-EXTENSION: FEAT_FlagM2
-// ARCH-EXTENSION: FEAT_HBC
-// ARCH-EXTENSION: FEAT_HCX
-// ARCH-EXTENSION: FEAT_I8MM
-// ARCH-EXTENSION: FEAT_JSCVT
-// ARCH-EXTENSION: FEAT_LOR
-// ARCH-EXTENSION: FEAT_LRCPC
-// ARCH-EXTENSION: FEAT_LRCPC2
-// ARCH-EXTENSION: FEAT_LSE
-// ARCH-EXTENSION: FEAT_LSE2
-// ARCH-EXTENSION: FEAT_MOPS
-// ARCH-EXTENSION: FEAT_MPAM
-// ARCH-EXTENSION: FEAT_NMI, FEAT_GICv3_NMI
-// ARCH-EXTENSION: FEAT_NV, FEAT_NV2
-// ARCH-EXTENSION: FEAT_PAN
-// ARCH-EXTENSION: FEAT_PAN2
-// ARCH-EXTENSION: FEAT_PAuth
-// ARCH-EXTENSION: FEAT_RAS, FEAT_RASv1p1
-// ARCH-EXTENSION: FEAT_RDM
-// ARCH-EXTENSION: FEAT_SB
-// ARCH-EXTENSION: FEAT_SEL2
-// ARCH-EXTENSION: FEAT_SPECRES
-// ARCH-EXTENSION: FEAT_SSBS, FEAT_SSBS2
-// ARCH-EXTENSION: FEAT_TLBIOS, FEAT_TLBIRANGE
-// ARCH-EXTENSION: FEAT_TRBE
-// ARCH-EXTENSION: FEAT_TRF
-// ARCH-EXTENSION: FEAT_UAO
-// ARCH-EXTENSION: FEAT_VHE
-// ARCH-EXTENSION: FEAT_WFxT
-// ARCH-EXTENSION: FEAT_XS
diff --git a/clang/test/Driver/aarch64-v89a.c b/clang/test/Driver/aarch64-v89a.c
index 42bcb127cd3bd..903b793d046ba 100644
--- a/clang/test/Driver/aarch64-v89a.c
+++ b/clang/test/Driver/aarch64-v89a.c
@@ -12,62 +12,3 @@
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.9a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV89A-BE %s
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv8.9-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV89A-BE %s
 // GENERICV89A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+v8.9a"{{.*}} "-target-feature" "+neon"
-
-// ===== Architecture extensions =====
-
-// RUN: %if aarch64-registered-target %{ %clang -target aarch64 -march=armv8.9-a --print-enabled-extensions | FileCheck -check-prefix=ARCH-EXTENSION --implicit-check-not FEAT_ %s %}
-// ARCH-EXTENSION: FEAT_AMUv1
-// ARCH-EXTENSION: FEAT_AMUv1p1
-// ARCH-EXTENSION: FEAT_AdvSIMD
-// ARCH-EXTENSION: FEAT_BF16
-// ARCH-EXTENSION: FEAT_BTI
-// ARCH-EXTENSION: FEAT_CCIDX
-// ARCH-EXTENSION: FEAT_CHK
-// ARCH-EXTENSION: FEAT_CLRBHB
-// ARCH-EXTENSION: FEAT_CRC32
-// ARCH-EXTENSION: FEAT_CSSC
-// ARCH-EXTENSION: FEAT_CSV2_2
-// ARCH-EXTENSION: FEAT_DIT
-// ARCH-EXTENSION: FEAT_DPB
-// ARCH-EXTENSION: FEAT_DPB2
-// ARCH-EXTENSION: FEAT_DotProd
-// ARCH-EXTENSION: FEAT_ECV
-// ARCH-EXTENSION: FEAT_ETE
-// ARCH-EXTENSION: FEAT_FCMA
-// ARCH-EXTENSION: FEAT_FGT
-// ARCH-EXTENSION: FEAT_FP
-// ARCH-EXTENSION: FEAT_FRINTTS
-// ARCH-EXTENSION: FEAT_FlagM
-// ARCH-EXTENSION: FEAT_FlagM2
-// ARCH-EXTENSION: FEAT_HBC
-// ARCH-EXTENSION: FEAT_HCX
-// ARCH-EXTENSION: FEAT_I8MM
-// ARCH-EXTENSION: FEAT_JSCVT
-// ARCH-EXTENSION: FEAT_LOR
-// ARCH-EXTENSION: FEAT_LRCPC
-// ARCH-EXTENSION: FEAT_LRCPC2
-// ARCH-EXTENSION: FEAT_LSE
-// ARCH-EXTENSION: FEAT_LSE2
-// ARCH-EXTENSION: FEAT_MOPS
-// ARCH-EXTENSION: FEAT_MPAM
-// ARCH-EXTENSION: FEAT_NMI, FEAT_GICv3_NMI
-// ARCH-EXTENSION: FEAT_NV, FEAT_NV2
-// ARCH-EXTENSION: FEAT_PAN
-// ARCH-EXTENSION: FEAT_PAN2
-// ARCH-EXTENSION: FEAT_PAuth
-// ARCH-EXTENSION: FEAT_PRFMSLC
-// ARCH-EXTENSION: FEAT_RAS, FEAT_RASv1p1
-// ARCH-EXTENSION: FEAT_RASv2
-// ARCH-EXTENSION: FEAT_RDM
-// ARCH-EXTENSION: FEAT_SB
-// ARCH-EXTENSION: FEAT_SEL2
-// ARCH-EXTENSION: FEAT_SPECRES
-// ARCH-EXTENSION: FEAT_SPECRES2
-// ARCH-EXTENSION: FEAT_SSBS, FEAT_SSBS2
-// ARCH-EXTENSION: FEAT_TLBIOS, FEAT_TLBIRANGE
-// ARCH-EXTENSION: FEAT_TRBE
-// ARCH-EXTENSION: FEAT_TRF
-// ARCH-EXTENSION: FEAT_UAO
-// ARCH-EXTENSION: FEAT_VHE
-// ARCH-EXTENSION: FEAT_WFxT
-// ARCH-EXTENSION: FEAT_XS
diff --git a/clang/test/Driver/aarch64-v8a.c b/clang/test/Driver/aarch64-v8a.c
index a3b01560b22a6..d58e1c29cf2eb 100644
--- a/clang/test/Driver/aarch64-v8a.c
+++ b/clang/test/Driver/aarch64-v8a.c
@@ -19,11 +19,3 @@
 // RUN: %clang --target=arm64 -mlittle-endian -march=armv8a -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERICV8A %s
 // RUN: %clang --target=arm64 -mlittle-endian -march=armv8-a -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERICV8A %s
 // ARM64-GENERICV8A: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "generic"{{.*}} "-target-feature" "+v8a"{{.*}} "-target-feature" "+neon"
-
-// ===== Architecture extensions =====
-
-// RUN: %if aarch64-registered-target %{ %clang -target aarch64 -march=armv8-a --print-enabled-extensions | FileCheck -check-prefix=ARCH-EXTENSION --implicit-check-not FEAT_ %s %}
-// ARCH-EXTENSION: FEAT_AdvSIMD
-// ARCH-EXTENSION: FEAT_ETE
-// ARCH-EXTENSION: FEAT_FP
-// ARCH-EXTENSION: FEAT_TRBE
diff --git a/clang/test/Driver/aarch64-v91a.c b/clang/test/Driver/aarch64-v91a.c
index c5667f8fb3bcd..80853a59d0153 100644
--- a/clang/test/Driver/aarch64-v91a.c
+++ b/clang/test/Driver/aarch64-v91a.c
@@ -13,55 +13,3 @@
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv9.1a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV91A-BE %s
 // RUN: %clang --target=aarch64_be -mbig-endian -march=armv9.1-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV91A-BE %s
 // GENERICV91A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+v9.1a"{{.*}} "-target-feature" "+sve" "-target-feature" "+sve2"
-
-// ===== Architecture extensions =====
-
-// RUN: %if aarch64-registered-target %{ %clang -target aarch64 -march=armv9.1-a --print-enabled-extensions | FileCheck -check-prefix=ARCH-EXTENSION --implicit-check-not FEAT_ %s %}
-// ARCH-EXTENSION: FEAT_AMUv1
-// ARCH-EXTENSION: FEAT_AMUv1p1
-// ARCH-EXTENSION: FEAT_AdvSIMD
-// ARCH-EXTENSION: FEAT_BF16
-// ARCH-EXTENSION: FEAT_BTI
-// ARCH-EXTENSION: FEAT_CCIDX
-// ARCH-EXTENSION: FEAT_CRC32
-// ARCH-EXTENSION: FEAT_CSV2_2
-// ARCH-EXTENSION: FEAT_DIT
-// ARCH-EXTENSION: FEAT_DPB
-// ARCH-EXTENSION: FEAT_DPB2
-// ARCH-EXTENSION: FEAT_DotProd
-// ARCH-EXTENSION: FEAT_ECV
-// ARCH-EXTENSION: FEAT_ETE
-// ARCH-EXTENSION: FEAT_FCMA
-// ARCH-EXTENSION: FEAT_FGT
-// ARCH-EXTENSION: FEAT_FP
-// ARCH-EXTENSION: FEAT_FP16
-// ARCH-EXTENSION: FEAT_FRINTTS
-// ARCH-EXTENSION: FEAT_FlagM
-// ARCH-EXTENSION: FEAT_FlagM2
-// ARCH-EXTENSION: FEAT_I8MM
-// ARCH-EXTENSION: FEAT_JSCVT
-// ARCH-EXTENSION: FEAT_LOR
-// ARCH-EXTENSION: FEAT_LRCPC
-// ARCH-EXTENSION: FEAT_LRCPC2
-// ARCH-EXTENSION: FEAT_LSE
-// ARCH-EXTENSION: FEAT_LSE2
-// ARCH-EXTENSION: FEAT_MEC
-// ARCH-EXTENSION: FEAT_MPAM
-// ARCH-EXTENSION: FEAT_NV, FEAT_NV2
-// ARCH-EXTENSION: FEAT_PAN
-// ARCH-EXTENSION: FEAT_PAN2
-// ARCH-EXTENSION: FEAT_PAuth
-// ARCH-EXTENSION: FEAT_RAS, FEAT_RASv1p1
-// ARCH-EXTENSION: FEAT_RDM
-// ARCH-EXTENSION: FEAT_RME
-// ARCH-EXTENSION: FEAT_SB
-// ARCH-EXTENSION: FEAT_SEL2
-// ARCH-EXTENSION: FEAT_SPECRES
-// ARCH-EXTENSION: FEAT_SSBS, FEAT_SSBS2
-// ARCH-EXTENSION: FEAT_SVE
-// ARCH-EXTENSION: FEAT_SVE2
-// ARCH-EXTENSION: FEAT_TLBIOS, FEAT_TLBIRANGE
-// ARCH-EXTENSION: FEAT_TRBE
-// ARCH-EXTENSION: FEAT_TRF
-// ARCH-EXTENSION: FEAT_UAO
-// ARCH-EXTENSION: FEAT_VHE
diff --git a/clang/test/Driver/aarch64-v92a.c b/clang...
[truncated]

Copy link
Contributor

@jthackray jthackray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Large diff! LGTM, although obvs haven't read every line :)

@jroelofs
Copy link
Contributor

jroelofs commented Jul 5, 2024

The new tests are autogenerated, but I am not merging the script that creates them because there isn't a good place for it.

Mind sticking it in a gist at least so folks can use it for downstream subtargets?

@@ -0,0 +1,24 @@
// REQUIRES: aarch64-registered-target
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these should probably all go in an aarch64 folder with a lit.local.cfg:

targets = set(config.root.targets_to_build.split())
if not "AArch64" in targets:
    config.unsupported = True

and then drop the REQUIRES: lines from them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've kept them as-is so that they still correspond to the generating script.

@tmatheson-arm
Copy link
Contributor Author

Mind sticking it in a gist at least so folks can use it for downstream subtargets?

Here you go

@tmatheson-arm tmatheson-arm merged commit b9254ad into llvm:main Jul 8, 2024
11 checks passed
@tmatheson-arm tmatheson-arm deleted the print-xyz-extensions branch July 8, 2024 12:47
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 8, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux running on sanitizer-buildbot2 while building clang,llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/1159

Here is the relevant piece of the build log for the reference:

Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/i386-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m32', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/x86_64-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/x86_64-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-Wthread-safety', '-Wthread-safety-reference', '-Wthread-safety-beta', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/x86_64-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/x86_64-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/x86_64-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/x86_64-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 4348 of 9965 tests, 80 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80
FAIL: libFuzzer-i386-default-Linux :: fuzzer-finalstats.test (1446 of 4348)
******************** TEST 'libFuzzer-i386-default-Linux :: fuzzer-finalstats.test' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /b/sanitizer-x86_64-linux/build/build_debug/./bin/clang    -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta   --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/fuzzer -m32 /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/SimpleTest.cpp -o /b/sanitizer-x86_64-linux/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/fuzzer/I386DefaultLinuxConfig/Output/fuzzer-finalstats.test.tmp-SimpleTest
+ /b/sanitizer-x86_64-linux/build/build_debug/./bin/clang -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/fuzzer -m32 /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/SimpleTest.cpp -o /b/sanitizer-x86_64-linux/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/fuzzer/I386DefaultLinuxConfig/Output/fuzzer-finalstats.test.tmp-SimpleTest
RUN: at line 2: /b/sanitizer-x86_64-linux/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/fuzzer/I386DefaultLinuxConfig/Output/fuzzer-finalstats.test.tmp-SimpleTest -seed=1 -runs=77 -print_final_stats=1 2>&1 | FileCheck /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/fuzzer-finalstats.test --check-prefix=FINAL_STATS
+ /b/sanitizer-x86_64-linux/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/fuzzer/I386DefaultLinuxConfig/Output/fuzzer-finalstats.test.tmp-SimpleTest -seed=1 -runs=77 -print_final_stats=1
+ FileCheck /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/fuzzer-finalstats.test --check-prefix=FINAL_STATS
RUN: at line 9: /b/sanitizer-x86_64-linux/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/fuzzer/I386DefaultLinuxConfig/Output/fuzzer-finalstats.test.tmp-SimpleTest /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/dict1.txt -runs=33 -print_final_stats=1 2>&1 | FileCheck /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/fuzzer-finalstats.test --check-prefix=FINAL_STATS1
+ FileCheck /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/fuzzer-finalstats.test --check-prefix=FINAL_STATS1
+ /b/sanitizer-x86_64-linux/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/fuzzer/I386DefaultLinuxConfig/Output/fuzzer-finalstats.test.tmp-SimpleTest /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/dict1.txt -runs=33 -print_final_stats=1
/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/fuzzer-finalstats.test:10:15: error: FINAL_STATS1: expected string not found in input
FINAL_STATS1: stat::number_of_executed_units: 33
              ^
<stdin>:1:1: note: scanning from here
INFO: Running with entropic power schedule (0xFF, 100).
^
<stdin>:12:1: note: possible intended match here
stat::number_of_executed_units: 34
^

Input file: <stdin>
Check file: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/fuzzer-finalstats.test

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: INFO: Running with entropic power schedule (0xFF, 100). 
check:10'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
            2: INFO: Seed: 4262885033 
check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~
            3: INFO: Loaded 1 modules (9 inline 8-bit counters): 9 [0x56797be4, 0x56797bed),  
check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            4: INFO: Loaded 1 PC tables (9 PCs): 9 [0x56797bf0,0x56797c38),  
check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Step 13 (test compiler-rt debug) failure: test compiler-rt debug (failure)
...
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/i386-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m32', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/x86_64-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/x86_64-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-Wthread-safety', '-Wthread-safety-reference', '-Wthread-safety-beta', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/x86_64-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/x86_64-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/x86_64-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/b/sanitizer-x86_64-linux/build/build_debug/lib/clang/19/lib/x86_64-unknown-linux-gnu". This path was found by running ['/b/sanitizer-x86_64-linux/build/build_debug/./bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-print-runtime-dir'].
llvm-lit: /b/sanitizer-x86_64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 4348 of 9965 tests, 80 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80
FAIL: libFuzzer-i386-default-Linux :: fuzzer-finalstats.test (1446 of 4348)
******************** TEST 'libFuzzer-i386-default-Linux :: fuzzer-finalstats.test' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /b/sanitizer-x86_64-linux/build/build_debug/./bin/clang    -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta   --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/fuzzer -m32 /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/SimpleTest.cpp -o /b/sanitizer-x86_64-linux/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/fuzzer/I386DefaultLinuxConfig/Output/fuzzer-finalstats.test.tmp-SimpleTest
+ /b/sanitizer-x86_64-linux/build/build_debug/./bin/clang -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/fuzzer -m32 /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/SimpleTest.cpp -o /b/sanitizer-x86_64-linux/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/fuzzer/I386DefaultLinuxConfig/Output/fuzzer-finalstats.test.tmp-SimpleTest
RUN: at line 2: /b/sanitizer-x86_64-linux/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/fuzzer/I386DefaultLinuxConfig/Output/fuzzer-finalstats.test.tmp-SimpleTest -seed=1 -runs=77 -print_final_stats=1 2>&1 | FileCheck /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/fuzzer-finalstats.test --check-prefix=FINAL_STATS
+ /b/sanitizer-x86_64-linux/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/fuzzer/I386DefaultLinuxConfig/Output/fuzzer-finalstats.test.tmp-SimpleTest -seed=1 -runs=77 -print_final_stats=1
+ FileCheck /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/fuzzer-finalstats.test --check-prefix=FINAL_STATS
RUN: at line 9: /b/sanitizer-x86_64-linux/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/fuzzer/I386DefaultLinuxConfig/Output/fuzzer-finalstats.test.tmp-SimpleTest /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/dict1.txt -runs=33 -print_final_stats=1 2>&1 | FileCheck /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/fuzzer-finalstats.test --check-prefix=FINAL_STATS1
+ FileCheck /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/fuzzer-finalstats.test --check-prefix=FINAL_STATS1
+ /b/sanitizer-x86_64-linux/build/build_debug/runtimes/runtimes-bins/compiler-rt/test/fuzzer/I386DefaultLinuxConfig/Output/fuzzer-finalstats.test.tmp-SimpleTest /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/dict1.txt -runs=33 -print_final_stats=1
/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/fuzzer-finalstats.test:10:15: error: FINAL_STATS1: expected string not found in input
FINAL_STATS1: stat::number_of_executed_units: 33
              ^
<stdin>:1:1: note: scanning from here
INFO: Running with entropic power schedule (0xFF, 100).
^
<stdin>:12:1: note: possible intended match here
stat::number_of_executed_units: 34
^

Input file: <stdin>
Check file: /b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/fuzzer/fuzzer-finalstats.test

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: INFO: Running with entropic power schedule (0xFF, 100). 
check:10'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
            2: INFO: Seed: 4262885033 
check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~
            3: INFO: Loaded 1 modules (9 inline 8-bit counters): 9 [0x56797be4, 0x56797bed),  
check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            4: INFO: Loaded 1 PC tables (9 PCs): 9 [0x56797bf0,0x56797c38),  
check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DavidSpickett added a commit that referenced this pull request Jul 9, 2024
This test is flaky and has been reporting irrelevant failures to PRs
on Github for example:
#97829 (comment)
https://lab.llvm.org/buildbot/#/builders/66/builds/1159

Adding this to #97712.
@DavidSpickett
Copy link
Collaborator

Re. the test failure, I've been disabling these and collecting them in #97712. Let me know if you see any others.

aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
This test is flaky and has been reporting irrelevant failures to PRs
on Github for example:
llvm#97829 (comment)
https://lab.llvm.org/buildbot/#/builders/66/builds/1159

Adding this to llvm#97712.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:RISC-V clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants